package logic;

import java.io.Serializable;
import java.util.ArrayList;

public class Message implements Serializable{
		
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public final static int ERROR_CONTROL = 1000;					//this message will notify the user for any server error during a request from the client
	
	public final static int LOGIN_REQUEST = 1;
	public final static int LOGIN_RESPONSE = 2;
	public final static int LOGOFF_REQUEST = 3;
	
	public final static int CREATE_MEMBER_REQUEST = 5; 	
	public final static int CREATE_MEMBER_RESPONSE = 6; 
	public final static int ADD_BOOK_REQUEST = 7;
	public final static int ADD_BOOK_RESPONSE = 8;
	
	public final static int SEARCH_MEMBER_REQUEST = 9;
	public final static int SEARCH_MEMBER_RESPONSE = 10;
	public final static int SEARCH_BOOK_REQUEST = 11;
	public final static int SEARCH_BOOK_RESPONSE = 12;
	public final static int SEARCH_LOAN_REQUEST = 13;
	public final static int SEARCH_LOAN_RESPONSE = 14;
	public final static int SEARCH_ORDER_REQUEST = 15;
	public final static int SEARCH_ORDER_RESPONSE = 16;
	
	public final static int CREATE_LOAN_REQUEST = 17;
	public final static int CREATE_LOAN_RESPONSE = 18;
	public final static int CREATE_ORDER_REQUEST = 19;
	public final static int CREATE_ORDER_RESPONSE = 20;
	
	public final static int DELETE_BOOK_REQUEST = 21;
	public final static int DELETE_BOOK_RESPONSE = 22;
	public final static int UPDATE_BOOK_REQUEST = 23;
	public final static int UPDATE_BOOK_RESPONSE = 24;
	public final static int RETUREN_BOOK_REQUEST = 25;
	public final static int RETURN_BOOK_RESPONSE = 26;
	
	public final static int LOAN_REPORT_REQUEST = 27;
	public final static int LOAN_REPORT_RESPONSE = 28;
	public final static int LATE_RETURN_REPORT_REQUEST = 29;
	public final static int LATE_RETURN_REPORT_RESPONSE = 30;
	public final static int ACTIVITY_REPORT_REQUEST = 31;
	public final static int ACTIVITY_REPORT_RESPONSE = 32;
	public final static int LATE_RETURN_REPORT_CATEGORY_REQUEST = 33;
	public final static int LATE_RETURN_REPORT_CATEGORY_RESPONSE = 34;
	public final static int LATE_RETURN_REPORT_BOOK_REQUEST = 35;
	public final static int LATE_RETURN_REPORT_BOOK_RESPONSE = 36;
	
	public final static int GET_MESSAGES_REQUEST = 37;
	public final static int GET_MESSAGES_RESPONSE = 38;
	public final static int DELETE_MESSAGE_REQUEST = 39;
	public final static int READ_MESSAGE_REQUEST = 40;
	
	public final static int FREEZE_MEMBER_REQUEST = 41;
	public final static int UPDATE_MEMBER_REQUEST = 42;
	
	public final static int SEARCH_WORKER_REQUEST = 43;	
	public final static int SEARCH_WORKER_RESPONSE = 44;

	public final static int EXTEND_LOAN_REQUEST = 45;
	public final static int EXTEND_LOAN_RESPONSE = 46;
	
	public final static int CANCEL_ORDER_REQUEST = 47;
	public final static int CANCEL_ORDER_RESPONSE = 48;
	
	public final static int PDF_REQUEST = 49;
	public final static int PDF_RESPONSE = 50;

	private ArrayList<String> data_index; 
	private ArrayList<Object> data;
	
	private int action;
	
	public Message(ArrayList<String> data_index,ArrayList<Object> data,int action ){
		this.data_index = data_index;
		this.data = data;
		this.action = action;

		
	}
	

	public ArrayList<String> GetMessageIndexes(){ return data_index;}
	public ArrayList<Object> GetMessageData() { return data;}
	public int GetAction(){return action;}
	
	
}
